<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js网页计算机</title>
</head>
<body>

<p>
    整数一:<input type="text" id="yi">
</p>

<p>
    整数二:<input type="text" id="er">
</p>
<p>
    <button onclick="calculator('a')">相加</button>
    <button onclick="calculator('b')">相减</button>
    <button onclick="calculator('c')">相乘</button>
    <button onclick="calculator('d')">相除</button>
</p>

<p>
    得数:<input type="text" id="de">
</p>
<script src="script.js"></script>
</body>
</html>